package com.vencent.quartz.java;


import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * Scheduler - the main API for interacting with the scheduler.
 * Job - an interface to be implemented by components that you wish to have executed by the scheduler.
 * JobDetail - used to define instances of Jobs.
 * Trigger - a component that defines the schedule upon which a given Job will be executed.
 * JobBuilder - used to define/build JobDetail instances, which define instances of Jobs.
 * TriggerBuilder - used to define/build Trigger instances.
 * 
 * Scheduler - 主要的API对于日程安排
 * Job       - 你想要执行的任务
 * JobDetail - 用来声明Job的实例
 * Trigger   - 一个组件用来声明哪一个Job将会被Schedule执行
 * JobBuilder- 用来声明, 创建 JobDetail的实例
 * TriggerBuilder- 用来声明, 创建Trigger的实例。
 * @author wbw
 *
 */
public class HelloJob implements Job{

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		String value = (String) context.getMergedJobDataMap().get("data");
		System.out.println(new Date() + "_" + value);
		
	}

}
